package com.ll.systemdemo;

import java.util.Arrays;

/**
 * @author 刘龙
 * @version 1.0
 */
public class System02 {
    public static void main(String[] args) {
        int[] src = {1, 2, 3};
        int[] dest = new int[3];
        /**
         * Params:
         * src – the source array. => 源数组
         * srcPos – starting position in the source array. => 源数组中的起始位置
         * dest – the destination array.- => 目标数组
         * destPos – starting position in the destination data. => 目标数组的起始位置
         * length – the number of array elements to be copied. => 要赋值数组元素的数量
         */
        System.arraycopy(src, 0, dest, 0, 3);

        // [1, 2, 3]
        System.out.println(Arrays.toString(dest));
    }
}
